#ifndef MAINGROUP_H
#define MAINGROUP_H

#include <QString>
#include "projectdatabaseoperations.h"

class MainGroup
{
private:
    int id;
    
    int value;
    
    QString name;
    
    QString describe;
    
    int upID;
    
    QString address;
    
    int type;
    
public:
    MainGroup();
    
    int getID();
    
    int getValue();
    
    QString getName();
    
    QString getDescribe();
    
    int getUpID();
    
    QString getAddress();
    
    int getType();
    
    void setID(int _id);
    
    void setValue(int _value);
    
    void setName(QString _name);
    
    void setDescribe(QString _describe);
    
    void setUpID(int _upID);
    
    void setAddress(QString _address);
    
    void setType(int _type);
    
    void setAll(int _id, int _value, QString _name, QString _describe, int _upID, QString _address, int _type);
    
    bool saveAllToDB(int _id, int _value, QString _name, QString _describe, int _upID, QString _address, 
                     int _productID, int _deviceID, int _eepromAddress, int _addressNum, int _type);
    
    bool deleteFromDB(int _id);
    
    bool updateNameToDB(int _id, QString _name);
    
    bool updateDescribeToDB(int _id, QString _describe);
};

#endif // MAINGROUP_H
